package com.scvtc.service.student;

import com.baomidou.mybatisplus.extension.service.IService;
import com.scvtc.domain.ResResult;
import com.scvtc.domain.dto.student.base.StudentsBaseDto;
import com.scvtc.domain.entity.student.StudentsBase;
import com.scvtc.domain.vo.PageVo;
import com.scvtc.domain.vo.student.base.StuEnrollmentPlanVo;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 学生基本信息(StudentsBase)表服务接口
 *
 * @author yiFei
 * @since 2022-04-13 17:38:27
 */
public interface StudentsBaseService extends IService<StudentsBase> {
    /**
     * 获取学生基本信息
     *
     * @param current
     * @param size
     * @param studentsBaseDto
     * @return
     */
    ResResult<PageVo<List<StudentsBaseDto>>> getAllStudentBase(Long current, Long size, StudentsBaseDto studentsBaseDto);

    /**
     * 添加一个学生
     *
     * @param studentsBaseDto
     * @return
     */
    ResResult<?> addStudentBase(StudentsBaseDto studentsBaseDto);

    /**
     * 修改学生信息
     *
     * @param studentsBaseDto
     * @return
     */
    ResResult<?> updateStudentBase(StudentsBaseDto studentsBaseDto);

    /**
     * 删除单个学生
     *
     * @param id
     * @return
     */
    @Transactional
    ResResult<?> deleteStudentBase(Long id);

    /**
     * 删除多个学生
     *
     * @param ids
     * @return
     */
    @Transactional
    ResResult<?> deleteMultipleStudentBase(Long[] ids);

    /**
     * 学生表导出excel
     *
     * @param response
     * @param studentsBaseDto
     */
    void exportExcel(HttpServletResponse response, StudentsBaseDto studentsBaseDto);

    /**
     * 学生表导出excel
     *
     */
    void exportExcel(HttpServletResponse response,Long[] ids);
    /**
     * 学生男女比例
     */
    ResResult<List<Map<String, Object>>> chartGender();

    /**
     * 学生近三年招生
     */
    ResResult<List<StuEnrollmentPlanVo>> chartEnrollmentPlan();
}

